<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  layout:decorator="layouts/layout_navbar" th:with="header='修改个人资料', subtext='修改个人资料'">

<head>
  <title>修改个人资料</title>
</head>

<body>
  <th:block layout:fragment="content">
    <div class="box">
      <div class="box-body">
        <form id="userForm" name="userForm" th:action="@{|${baseUrl}|}" method="post" class="form-horizontal" novalidate="novalidate">
          <input id="id" type="hidden" name="id" th:value="${m.id}" />
          <input id="version" type="hidden" name="version" th:value="${m.version}" />
          <div class="row">
            <div class="col-lg-12">
              <div class="form-group">
                <label class="control-label col-lg-2">用户名</label>
                <div class="col-lg-10">
                  <label class="form-control-static" th:text="${m.username}" />
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-lg-2">邮件</label>
                <div class="col-lg-10">
                  <input id="email" name="email" type="email" th:value="${m.email}" class="form-control" />
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-lg-2">姓名</label>
                <div class="col-lg-10">
                  <input id="fullname" name="fullname" th:value="${m.fullname}" class="form-control" />
                </div>
              </div>
              <hr/>
                <div class="form-group">
                  <label class="control-label col-lg-2">原密码</label>
                  <div class="col-lg-10">
                    <input id="oldPassword" name="oldPassword" type="password" class="form-control" />
                    <p class="help-block">如果需要修改密码，请输入原登录密码和新登录密码，未输入视为不修改密码!</p>
                  </div>
                </div>
                <div class="form-group">
                  <label class="control-label col-lg-2">新密码</label>
                  <div class="col-lg-10">
                    <input id="password" name="password" type="password" class="form-control" />
                    <p class="help-block">新登录密码，可以使用数字，英文字母，符号等组合</p>
                  </div>
                </div>
                <div class="form-group">
                  <label class="control-label col-lg-2">重复密码</label>
                  <div class="col-lg-10">
                    <input id="confirmPassword" name="confirmPassword" type="password" class="form-control" />
                    <p class="help-block">重复输入新登录密码</p>
                  </div>
                </div>

            </div>
          </div>

          <div class="hr-line-dashed"></div>
          <div class="form-group">
            <div class="text-center">
              <a th:href="@{/}" class="btn btn-primary">
                <i class="fa fa-fw fa-reply"></i> 返回</a>
              <button type="submit" class="btn btn-primary">
                <i class="fa fa-fw  fa-save"></i> 保存
              </button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </th:block>
  <th:block layout:fragment="scripts">
    <script th:replace="layouts/fragments/validatejs :: validate" />
  </th:block>
</body>

</html>
